home *** CD-ROM | disk | FTP | other *** search
/ Champak 128 / Vol 128 (Damaged).iso / games / present_.swf / scripts / frame_2 / DoAction.as < prev   
Encoding:
Text File  |  2011-03-26  |  2.1 KB  |  78 lines

  1. function gotoToplist()
  2. {
  3.    _root.gotoAndPlay("toplista");
  4. }
  5. function onReplyLogin(success)
  6. {
  7.    switch(replyLoginServer.status)
  8.    {
  9.       case 0:
  10.          msg = "No error; parse was completed successfully.";
  11.          break;
  12.       case -2:
  13.          msg = "A CDATA section was not properly terminated.";
  14.          break;
  15.       case -3:
  16.          msg = "The XML declaration was not properly terminated.";
  17.          break;
  18.       case -4:
  19.          msg = "The DOCTYPE declaration was not properly terminated.";
  20.          break;
  21.       case -5:
  22.          msg = "A comment was not properly terminated.";
  23.          break;
  24.       case -6:
  25.          msg = "An XML element was malformed.";
  26.          break;
  27.       case -7:
  28.          msg = "Out of memory.";
  29.          break;
  30.       case -8:
  31.          msg = "An attribute value was not properly terminated.";
  32.          break;
  33.       case -9:
  34.          msg = "A start-tag was not matched with an end-tag.";
  35.          break;
  36.       case -10:
  37.          msg = "An end-tag was encountered without a matching start-tag";
  38.    }
  39.    replyRoot = replyLoginServer.firstChild;
  40.    if(success)
  41.    {
  42.       _root.sid = replyRoot.lastChild.attributes.xmas2004_sid;
  43.    }
  44.    else
  45.    {
  46.       trace("------hiba az XML betoltesenel!");
  47.    }
  48. }
  49. function login(clientid, password)
  50. {
  51.    loginServer = new XML();
  52.    loginServer.xmlDecl = " <?xml version=\'1.0\' encoding=\'UTF-8\' ?>";
  53.    loginServerElement = loginServer.createElement("ask");
  54.    loginServer.appendChild(loginServerElement);
  55.    loginElement = loginServer.createElement("data");
  56.    loginElement.attributes.action = "get_sid";
  57.    loginServerElement.appendChild(loginElement);
  58.    loginServer.sendAndLoad("processor.php",replyLoginServer);
  59. }
  60. _global.style.setStyle("themeColor","haloGreen");
  61. so = SharedObject.getLocal("myObject");
  62. quality = SharedObject.getLocal("qualityObject");
  63. if(quality.data.quality != undefined)
  64. {
  65.    _root._quality = quality.data.quality;
  66. }
  67. else
  68. {
  69.    _root._quality = "high";
  70. }
  71. system.useCodePage = false;
  72. replyLoginServer = new XML();
  73. replyLoginServer.ignoreWhite = true;
  74. replyLoginServer.onLoad = onReplyLogin;
  75. stopAllSounds();
  76. login();
  77. stop();
  78.